import React from 'react';
import { isAnomaly } from './utils';

type ValueDisplayProp = {
  value: string | null | number | undefined;
};

export default ({ value }: ValueDisplayProp) =>
  isAnomaly(value) ? <span style={{ color: 'red' }}>--</span> : value;
